/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.goods.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.goods.dao.ZtCardMemDao;
import com.jeesite.modules.goods.entity.ZtCardMem;

/**
 * 测试数据Service
 * 
 * @author ThinkGem
 * @version 2018-04-22
 */
@Service
@Transactional(readOnly = true)
public class ZtCardMemService extends CrudService<ZtCardMemDao, ZtCardMem> {

	
	/**
	 * 获取单条数据
	 * 
	 * @param testData
	 * @return
	 */
	@Override
	public ZtCardMem get(ZtCardMem ztCardMem) {
		ZtCardMem entity = super.get(ztCardMem);
		if (entity == null) {
			entity = new ZtCardMem();
		}
		return entity;
	}
	public ZtCardMem getByAdminid(ZtCardMem ztCardMem) {
		
		return dao.getByAdminid(ztCardMem);
	}
	
	/**
	 * 查询分页数据
	 * 
	 * @param page
	 *            分页对象
	 * @param testData
	 * @return
	 */
	@Override
	public Page<ZtCardMem> findPage(Page<ZtCardMem> page, ZtCardMem ztCardMem) {
		return super.findPage(page, ztCardMem);
	}

	/**
	 * 保存数据（插入或更新）
	 * 
	 * @param testData
	 */
	@Override
	@Transactional(readOnly = false)
	public void save(ZtCardMem ztCardMem) {
		super.save(ztCardMem);
	
	}

	/**
	 * 删除数据
	 * 
	 * @param testData
	 */
	@Override
	@Transactional(readOnly = false)
	public void delete(ZtCardMem ztCardMem) {
		super.delete(ztCardMem);
	}

}